package com.tianjipms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tianjipms.dao.BillMapper;
import com.tianjipms.entity.Bill;
import com.tianjipms.entity.Opinion;
import com.tianjipms.service.BillService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements BillService {
    @Resource
    private BillMapper billMapper;
    @Override
    public IPage<Bill> findBillListByPage(IPage<Bill> page, Long userId) {
        QueryWrapper<Bill> queryWrapper = new QueryWrapper<Bill>();
        queryWrapper.eq("user_id", userId);
        return billMapper.selectPage(page, queryWrapper);
    }
}
